﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Gmail.Presenters.Events;
using Gmail.Model;
namespace Gmail.Presenters
{
    public static class App
    {
        private static IEmailView _EmailView = null;
        private static ILoginView _LoginView = null;
        private static EmailPresenter _EmailPresenter = null;
        private static LoginPresenter _LoginPresenter = null;
        public static void Init(IEmailView EmailView, ILoginView LoginView)
        {
            _EmailView = EmailView;
            _LoginView = LoginView;
            _EmailPresenter = EmailPresenter.Instant(_EmailView);
            _LoginPresenter = new LoginPresenter(_LoginView);
            
        }

        public static void ShowLogin(String Filename, String DisplayFilename){
            _LoginPresenter.ShowForm(Filename,DisplayFilename);
        }

        public static void ShowRelogin(String Filename, String DisplayFilename)
        {
            _LoginPresenter.Relogin(Filename, DisplayFilename);
        }

        public static void ShowEmail(String Filename, String DisplayFilename,Connector Connector)
        {
            _EmailPresenter.ShowForm(Filename, DisplayFilename, Connector);
        }

           
    }
}
